package io.geekidea.springbootplus.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.geekidea.springbootplus.system.entity.SysMember;
import io.geekidea.springbootplus.system.param.SysDepartmentPageParam;
import io.geekidea.springbootplus.system.param.sysmember.SysMemberPageParam;
import io.geekidea.springbootplus.system.vo.SysDepartmentQueryVo;
import io.geekidea.springbootplus.system.vo.SysMemberQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysMemberMapper extends BaseMapper<SysMember> {


    /**
     * 根据条件分页显示会员信息列表
     *
     * @param page
     * @param sysMemberPageParam
     * @return
     */
    IPage<SysMemberQueryVo> getSysMemberPageList(@Param("page") Page page, @Param("param") SysMemberPageParam sysMemberPageParam);

    /*
    * 通过openid查找会员信息
    * */
    SysMember getSysMemberByOpenid(String openid);


    /*
     * 通过id查找会员信息
     * */
    SysMemberQueryVo getSysMemberById(Integer id);

    /*
    * 逻辑删除会员
    * */

    Integer deleteSysMember(Integer id);

    Integer deleteMemberByBatch(List<Integer> idList);


}
